package com.mdd.admin.controller.order;

import com.mdd.admin.service.order.IAccountLogService;
import com.mdd.admin.service.order.IPointsLogService;
import com.mdd.admin.validate.common.PageParam;
import com.mdd.admin.vo.order.AccountLogListVo;
import com.mdd.admin.vo.order.PointsLogListVo;
import com.mdd.common.core.AjaxResult;
import com.mdd.common.core.PageResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * 积分日志
 * @author panweiliang
 */
@RestController
@RequestMapping("api/points/log")
public class PointsLogController {

    @Resource
    IPointsLogService iPointsLogService;



    /**
     * 用户账户记录列表
     *
     * @author panweiliang
     * @param pageParam 分页参数
     * @param params 搜索参数
     * @return Object
     */
    @GetMapping("/list")
    public Object list(@Validated PageParam pageParam,
                       @RequestParam Map<String, String> params) {
        PageResult<PointsLogListVo> list = iPointsLogService.list(pageParam, params);
        return AjaxResult.success(list);
    }

}
